package ubadb.core.components.bufferManager.bufferPool.replacementStrategies.lru;

import java.util.Date;

import ubadb.core.common.Page;
import ubadb.core.components.bufferManager.bufferPool.BufferFrame;
import ubadb.core.exceptions.BufferFrameException;

public class LRUBufferFrame extends BufferFrame
{
	
	private Date creationDate;
	private Date modificationDate;
	
	public LRUBufferFrame(Page page)
	{
		super(page);
		creationDate = new Date();
		modificationDate = new Date();

	}
	
	public void pin()
	{
		super.pin();	
		modificationDate = new Date();
	}
	
	public void unpin() throws BufferFrameException
	{
		super.unpin();	
		modificationDate = new Date();
	}
	
	public Date getCreationDate()
	{
		return creationDate;
	}

	public Date getModificationDate()
	{
		return modificationDate;
	}	
}
